package application

import (
	"context"
	"forum/qa/domain"
	"forum/qa/domain/repo"
)

type QAService interface {
	GetList(ctx context.Context, id int64, userId int64) ([]domain.Question, error)
}

type QAServiceImp struct {
	QARepo repo.QARepository
}

func (q *QAServiceImp) GetList(ctx context.Context, id int64, userId int64) ([]domain.Question, error) {
	list, err := q.QARepo.GetAllQuestionByAuthorId(ctx, userId)
	return list, err
}
